<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>IupFlatTabs</title>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<link rel="stylesheet" type="text/css" href="../../style.css">
<style type="text/css">
.style1 {
	font-size: large;
}
.style3 {
	background-color: #CEE7FF;
}
.auto-style1 {
	color: #FF0000;
}
.auto-style2 {
	text-align: center;
}
</style>
</head>
<body>
<div id="navigation">
  <ul>
    <li><a href="#Creation">Creation</a></li>
    <li><a href="#Attributes">Attributes</a></li>
    <li><a href="#Callbacks">Callbacks</a></li>
    <li><a href="#Notes">Notes</a></li>
    <li><a href="#Examples">Examples</a></li>
    <li><a href="#SeeAlso">See Also</a></li>
  </ul>
</div>

<h2>IupFlatTabs<span class="style1"> (since 3.21)</span></h2>
<p>Creates a native container for composing elements in hidden layers with only 
one layer visible (just like <a href="iupzbox.html">IupZbox</a>), 
but its visibility can be interactively controlled. The interaction is done in a line of tabs 
with titles and arranged 
according to the tab type. Also known as Notebook in native systems. Identical 
to the <a href="iuptabs.html">IupTabs</a> control but the decorations and 
buttons are manually drawn. It inherits from
  <a href="../elem/iupcanvas.html">IupCanvas</a>. </p>
<h3><a name="Creation">Creation</a></h3>
<div>
  <pre>Ihandle* IupFlatTabs(Ihandle*<strong> child</strong>, ...); [in C]
Ihandle* IupFlatTabsV(Ihandle* <strong>child</strong>, va_list <strong>arglist</strong>); [in C]
Ihandle* IupFlatTabsv(Ihandle**<strong> children</strong>); [in C]
iup.flattabs{<strong>child</strong>, ...: ihandle} -&gt; (<strong>ih</strong>: ihandle) [in Lua]
flattabs(<strong>child</strong>, ...) [in LED]</pre>
</div>
  <p><strong>child, ... </strong>: List of the elements that will be placed in 
	the box. NULL must be used to define the end of the list in C. It can be 
  empty, but in C must have at least the NULL terminator..</p>
  <p>
  <u>Returns:</u> the identifier of the created element, or NULL if an error 
	occurs.</p>

<h3><a name="Attributes">Attributes</a> (<font SIZE="3">non inheritable</font>)</h3>



<p>Inherits all attributes and callbacks of the <a href="../elem/iupcanvas.html">IupCanvas</a>, 
but redefines a few attributes. BORDER and SCROLLBAR are always NO.</p>


  <p>
<a href="../attrib/iup_bgcolor.html">BGCOLOR</a>: background color for the 
  current Tab and the children. Default: &quot;255 255 255&quot;. It is non inheritable, 
  but when set will internally propagate to the children (since 3.25).</p>

<p><strong>CANFOCUS</strong> (creation only)<strong> </strong>(<font size="3">non inheritable</font>): 
enables the focus traversal of the control. Default: YES.</p>
<p><strong>FOCUSFEEDBACK</strong> (<font size="3">non inheritable</font>): draw 
the focus feedback. Can be Yes or No. Default: Yes. (since 3.27)</p>

<p><strong>PROPAGATEFOCUS </strong>(<font size="3">non inheritable</font>): enables the focus callback forwarding to the next native parent with FOCUS_CB defined. Default: NO. (since 3.23)</p>

<p><strong>CHILDSIZEALL</strong> (<font SIZE="3">non inheritable</font>): 
compute the natural size using all children. If set to NO will compute using 
only the current tab. Default: Yes. (since 3.27)</p>

<p>
<strong>FORECOLOR</strong>: text color for the current Tab. Default: 
&quot;50 150 255&quot;.</p>
<p>
<strong>HIGHCOLOR</strong>: text color for the highlighted Tab. The current Tab 
is never highlighted, so it affects only the other tabs. If not defined 
FORECOLOR will be used.</p>
<p><strong>CHILDOFFSET</strong>: Allow to specify a position offset for the 
child. Available for native containers only. It will not affect the natural 
size, and allows to position controls outside the client area. Format &quot;<em>dx</em>x<em>dy</em>&quot;,
  where <em>dx</em> and <em>dy</em> are integer values corresponding to the 
horizontal and vertical offsets, respectively, in pixels. Default: 0x0.</p>

<p><b>COUNT</b> (read-only)<b>:</b> 
returns the number of tabs. Same value returned by <strong>IupGetChildCount</strong>.</p>
<p><a href="../attrib/iup_expand.html">EXPAND</a>: The default value is &quot;YES&quot;.</p>
<p><strong>FIXEDWIDTH</strong>: forces all tabs to use the same width, given by 
the attribute. It does not include padding, nor the close button space if any, 
i.e. padding and close button space will be added to the fixed width.</p>
<p><strong>HASFOCUS </strong> (read-only): returns the tabs state if it has 
focus. Can be Yes or No. (since 3.25)</p>
<p><b>SHOWCLOSE</b>: <span id="result_box1" class="short_text" lang="en">
<span class="hps">enables</span> <span class="hps">the close button on each</span>
<span class="hps">tab.</span></span><span id="result_box0" class="" lang="en"><span class="">
</span></span>Default value: &quot;NO&quot;. By default when closed the tab is hidden. 
To change that behavior use the TABCLOSE_CB callback.</p>
<p><strong>SHOWLINES</strong>: when enabled the current tab will be separated of 
the other tabs by a line. Can be Yes or No. Default: Yes.</p>
<p><a href="../attrib/iup_size.html">SIZE</a>: 
	The default size is the smallest size that fits its largest child. All child 
	elements are considered even invisible ones.</p>
<p><strong>TABCHANGEONCHECK</strong>: call the TABCHANGE* callbacks when current 
tab is removed or hidden, so a new tab is made current internally. (since 3.22)</p>
  <p><b>TABSPADDING</b>: internal margin of the tab title. Works just like the 
	MARGIN attribute of the IupHbox and IupVbox containers, but uses a different 
  name to avoid inheritance problems. Alignment does not includes the padding 
  area. Default value: &quot;6x4&quot; (default changed in 3.29).</p>
<p><strong>TABSFORECOLOR</strong>: text color of the tabs that are not the 
current tab. Default: the global attribute DLGFGCOLOR.</p>
<p><strong>TABSBACKCOLOR</strong>: background color of the tabs that are not the 
current tab. If not defined it will use the background color of the parent.</p>
<p><strong>TABSHIGHCOLOR</strong>: background highlight color of the tabs that 
are not the current tab. When not defined the background is not highlighted. </p>
<p><strong>TABSFONT</strong>: text font of the tabs. When not defined FONT is 
used. It is a non inheritable option for setting the font.</p>
<p><strong>TABSFONTSTYLE</strong>: text font style. When change will actually 
set TABSFONT.</p>
<p><strong>TABSFONTSIZE</strong>: text font size. When change will actually set 
TABSFONT.</p>
<p><strong>TABSTEXTALIGNMENT </strong>(<font size="3">non inheritable</font>): 
Horizontal text alignment for multiple lines. Can be: ALEFT, ARIGHT or ACENTER. 
Default: ALEFT. (since 3.22)</p>
<p><strong>TABSTEXTWRAP </strong>(<font size="3">non inheritable</font>): For 
single line texts if the text is larger than its box the line will be 
automatically broken in multiple lines. Notice that this is done internally by 
the system, the element natural size will still use only a single line. For the 
remaining lines to be visible the element should use EXPAND=VERTICAL or set a 
SIZE/RASTERSIZE with enough height for the wrapped lines. (since 
3.25)</p>
<p><strong>TABSTEXTELLIPSIS </strong>(<font size="3">non inheritable</font>): If 
the text is larger that its box, an ellipsis (&quot;...&quot;) will be placed near the 
last visible part of the text and replace the invisible part. It will be ignored 
when TEXTWRAP=Yes. (since 3.25)</p>
<p>
<span style="color: rgb(0, 0, 0); font-family: tahoma, verdana, arial, helvetica, geneva, sans-serif; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20.8px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: rgb(255, 255, 255);">
<span class="Apple-converted-space">
<strong>TABSTEXTORIENTATION</strong> (<font size="3">non inheritable</font>): 
text angle in degrees and counterclockwise. The text size will adapt to include 
the rotated space. (since 3.25)</span></span></p>



  
<p><strong>TABTYPE </strong>(<font SIZE="3">non inheritable</font>): the type of tabs, 
which can be &quot;TOP&quot;, &quot;BOTTOM&quot;, &quot;LEFT&quot; or &quot;RIGHT&quot;. Default is &quot;TOP&quot;. It will not 
automatically change the TABORIENTATION. When changed with the dialog visible 
the application should call IupRefresh or IupRefresh children to updated the 
layout when ready. (since 3.27)</p>



  
  <p><strong>TABORIENTATION </strong>(<font SIZE="3">non inheritable</font>): 
  the orientation of tab text, which can be &quot;HORIZONTAL&quot; or 
  &quot;VERTICAL&quot;. Default is &quot;HORIZONTAL&quot;. When set to vertical it will simply set
  <span style="color: rgb(0, 0, 0); font-family: tahoma, verdana, arial, helvetica, geneva, sans-serif; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20.8px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: rgb(255, 255, 255);">
  <span class="Apple-converted-space">
  TABSTEXTORIENTATION to 90. (since 3.25)</span></span></p>



  
<p><strong>TABSLINECOLOR</strong>: color of the separator line. Default: &quot;160 
160 160&quot;</p>
<p><strong>TABSIMAGEPOSITION</strong>: position of the image relative to the 
text when both are displayed. Can be: LEFT, RIGHT, TOP, BOTTOM. Default: LEFT.</p>
<p><strong>TABSIMAGESPACING</strong>: spacing between the image and the text. 
Default: &quot;2&quot;.</p>
<p><strong>TABSALIGNMENT</strong>: horizontal and vertical alignment of the set 
image+text. Possible values: &quot;ALEFT&quot;, &quot;ACENTER&quot; and &quot;ARIGHT&quot;,&nbsp; 
combined to &quot;ATOP&quot;, &quot;ACENTER&quot; and &quot;ABOTTOM&quot;. 
Alignment does not includes the padding area. Default: &quot;ACENTER:ACENTER&quot;. Partial 
values are also accepted, like &quot;ARIGHT&quot; or &quot;:ATOP&quot;, the other value will be 
obtained from the default value. </p>
<h4>Tab Attributes (<font SIZE="3">non inheritable</font>)</h4>

  <p><strong>TABIMAGEn</strong>: image 
	name to be used in the respective tab. Use <a href="../func/iupsethandle.html">
	IupSetHandle</a> or
	<a href="../func/iupsetattributehandle.html">IupSetAttributeHandle</a> to 
	associate an image to a name. n starts at 0. See also <a href="iupimage.html">IupImage</a>. </p>
<p><strong>TABIMAGEHIGHTLIGHTn</strong>: same as TABIMAGEn when in highlight 
state. If not defined TABIMAGEn is used. (since 3.22)</p>
<p><strong>TABIMAGEINACTIVEn</strong>: same as TABIMAGEn when in inactive state. 
If not defined TABIMAGEn is used and its colors will be replaced by a modified 
version creating the disabled effect. (since 3.22)</p>


<p><strong>TABVISIBLEn</strong>: controls the visibility of a tab. When a tab 
is hidden the tabs indices are not changed. Can be Yes or No. Default: Yes.</p>
<p><strong>TABTITLEn</strong>: contains the text to be shown in the respective 
tab title. n starts at 0. If this value is NULL, it will remain empty. </p>
<p><strong>TABACTIVEn</strong>: active state of the tab.&nbsp; Can be Yes or No. 
Default: Yes.</p>
<p><strong>TABFORECOLORn</strong>: text color of the tab title. When not defined TABSFORECOLOR 
is used.</p>
<p><strong>TABBACKCOLORn</strong>: background color of the tab. When not defined TABSBACKCOLOR 
is used.</p>
<p><strong>TABHIGHCOLORn</strong>: highlight color of the tab title. When not defined TABSHIGHCOLOR 
is used.</p>
<p><strong>TABFONTn</strong>: text font of the tab. When not defined TABSFONT is 
used.</p>
<p><strong>TABFONTSTYLEn</strong>: text font style. When change will actually 
set TABFONTn. </p>
<p><strong>TABFONTSIZEn</strong>: text font size. When change will actually set 
TABFONTn. </p>
<p><strong>TABTIPn</strong>: TIP of the tab. (since 3.22)</p>
<h4>Tab Close Button Attributes</h4>
<p><strong>CLOSEIMAGE</strong>: image name to be used in the close button. Use <a href="../func/iupsethandle.html">
	IupSetHandle</a> or
	<a href="../func/iupsetattributehandle.html">IupSetAttributeHandle</a> to 
	associate an image to a name. n starts at 0. See also <a href="iupimage.html">IupImage</a>. 
Default: &quot;IMGFLATCLOSE&quot;.</p>
<p><strong>CLOSEIMAGEPRESS</strong>: image name to be used in the close button 
in pressed state. Default: &quot;IMGFLATCLOSEPRESS&quot;.</p>
<p><strong>CLOSEIMAGEHIGHLIGHT</strong>: image name to be used in the close 
button in highlight state. </p>
<p><strong>CLOSEIMAGEINACTIVE</strong>: image name to be used in the close button 
in inactive state. If it is not defined then the CLOSEIMAGE is used and its 
colors will be replaced by a modified version creating the disabled effect. 
(since 3.22)</p>
<p><strong>CLOSEPRESSCOLOR</strong>: background color of the close button in 
pressed state. Default: &quot;50 150 255&quot;. (since 3.22)</p>
<p><strong>CLOSEHIGHCOLOR</strong>: background color of the close button in 
highlight state. Default: &quot;200 225 245&quot;.</p>
<h4>Extra Buttons Attributes (<font SIZE="3">non inheritable</font>) (since 3.22)</h4>
<p><strong>EXTRABUTTONS</strong>: sets 
the number of extra image buttons at right in the free space area. There can be 
any number of buttons. See the EXTRABUTTON_CB callback. Default: 0.</p>
<p class="info">Button id starts at 1, and are positioned from right to left. 
Just like the tabs they do not affect natural width. But they also don't affect 
the tabs title height, if button title or image are larger than the tabs title 
height they will be cropped.</p>
<p><strong>EXTRATITLE</strong><em><strong>id</strong></em>: text of the 
respective button.</p>
<p><strong>EXTRAACTIVE</strong><em><strong>id</strong></em>: active state of the 
button. Can be Yes or No. When not defined works as &quot;Yes&quot;.</p>
<p><strong>EXTRABORDERWIDTH<em>id</em></strong>: width of the button border. Set this 
attribute to at least 1 to enable the border. Default: 0 (since 3.27)</p>
<p><strong>EXTRASHOWBORDER<em>id</em></strong>: always show the button border. If not 
defined the border is shown when highlighted or pressed. Default: NO (since 
3.27)</p>
<p><strong>EXTRABORDERCOLOR<em>id</em></strong>: color of the border. Default: &quot;50 150 255&quot; 
(since 3.27)</p>
<p><strong>EXTRAFORECOLOR</strong><em><strong>id</strong></em>: text color of 
the button title. When not defined TABSFORECOLOR 
is used.</p>
<p><strong>EXTRAPRESSCOLOR</strong><em><strong>id</strong></em>: background 
color of the button in pressed state. Default: &quot;150 200 235&quot;.</p>
<p><strong>EXTRAHIGHCOLOR</strong><em><strong>id</strong></em>: background color 
of the button in highlight state. Default: &quot;200 225 245&quot;.</p>
<p><strong>EXTRAFONT</strong><em><strong>id</strong></em>: text font of the 
button. When not defined TABSFONT is used.</p>
<p><strong>EXTRAIMAGE</strong><em><strong>id</strong></em>: image name to be 
used in the respective button. Use <a href="../func/iupsethandle.html">
	IupSetHandle</a> or
	<a href="../func/iupsetattributehandle.html">IupSetAttributeHandle</a> to 
	associate an image to a name. n starts at 0. See also <a href="iupimage.html">IupImage</a>. </p>
<p><strong>EXTRAIMAGEPRESS</strong><em><strong>id</strong></em>: same as 
EXTRAIMAGE<em>id</em> when in pressed 
state. If not defined EXTRAIMAGE<em>id</em> is used.</p>
<p><strong>EXTRAIMAGEHIGHLIGHT</strong><em><strong>id</strong></em>: same as 
EXTRAIMAGE<em>id</em> when in highlight 
state. If not defined EXTRAIMAGE<em>id</em> is used.</p>
<p><strong>EXTRAIMAGEINACTIVE</strong><em><strong>id</strong></em>: same as 
EXTRAIMAGE<em>id</em> when in inactive 
state. If not defined EXTRAIMAGE<em>id</em> is used and its colors will be 
replaced by a modified version creating the disabled effect.</p>
<p><strong>EXTRATIP<em>id</em></strong>: TIP of the button.</p>
<p><strong>EXTRATOGGLE<em>id</em></strong>: enabled the toggle behavior. Default: NO. 
(since 3.27)</p>
<p><b><strong>EXTRA</strong>VALUE<strong><em>id</em></strong></b>: Toggle's 
state. Values can be &quot;ON&quot; or &quot;OFF&quot;. Default: &quot;OFF&quot;. (since 3.27)</p>
<h4>Expand Button Attributes (<font SIZE="3">non inheritable</font>) (since 3.22)</h4>
<p><strong>EXPANDBUTTON</strong>: uses the next free extra button to configure 
an expand button. The button allows to dynamically expand and collapse the tabs 
contents. When collapsed a click on a tab causes that tab to be temporarily 
expanded until it looses the focus.</p>
<p><strong>EXPANDBUTTONPOS</strong> (read-only): position of the expand button 
in the extra buttons.</p>
<p><strong>EXPANDBUTTONSTATE</strong>: The expand button is on expand state. Can 
be Yes or No. Default: Yes.</p>
<h4>Current Tab (<font SIZE="3">non inheritable</font>)</h4>
<p><strong>VALUE</strong>: Changes the 
current tab by its name. The value passed must be the name of one of the elements 
contained in the tabs. Use <a href="../func/iupsethandle.html">
IupSetHandle</a> or <a href="../func/iupsetattributehandle.html">
IupSetAttributeHandle</a> to associate a child to a name. In Lua you can also 
use the element reference directly. When the tabs is created, the first element 
inserted is set as the current tab. When the current tab is changed is also 
scrolled to be visible (since 3.23).</p>
<p><b>VALUE_HANDLE</b>: Changes the current tab by its handle. The value passed 
must be the handle of a child contained in the tabs. </p>
<p><strong>VALUEPOS</strong>: Changes the current tab by its position, starting 
at 0.</p>
  <blockquote>
  <hr>
</blockquote>
<p>
<a href="../attrib/iup_active.html">ACTIVE</a>,
<a href="../attrib/iup_font.html">FONT</a>, <a href="../attrib/iup_screenposition.html">SCREENPOSITION</a>, 
<a href="../attrib/iup_position.html">
POSITION</a>, 
<a href="../attrib/iup_clientsize.html">CLIENTSIZE</a>, 
	<a href="../attrib/iup_clientoffset.html">CLIENTOFFSET</a>, 
	<a href="../attrib/iup_minsize.html">
MINSIZE</a>, <a href="../attrib/iup_maxsize.html">
MAXSIZE</a>,
    <a href="../attrib/iup_wid.html">WID</a>, 
<a href="../attrib/iup_tip.html">TIP</a>, 
<a href="../attrib/iup_rastersize.html">RASTERSIZE</a>,
    <a href="../attrib/iup_zorder.html">ZORDER</a>, <a href="../attrib/iup_visible.html">
VISIBLE</a>, <a href="../attrib/iup_theme.html">THEME</a>: also accepted.</p>

<h3>Attributes (at Children)</h3>

  <p><a href="../attrib/iup_floating.html">FLOATING</a> (<font SIZE="3">non inheritable</font>)
	<strong>(at children only)</strong>: If a child has FLOATING=YES then its 
  size and position will be ignored by the layout processing. Default: &quot;NO&quot;. 
  (since 3.27)</p>

<p><strong>TABTITLE </strong>(<font SIZE="3">non inheritable</font>) <strong>(at 
children only)</strong>: Same as TABTITLEn but set in each 
child. Works only if set before the child is added to the tabs. It is not updated 
if TABTITLEn is changed.</p>
<p><strong>TABIMAGE </strong>(<font SIZE="3">non inheritable</font>) <strong>(at 
children only)</strong>: Same as <strong>TABIMAGEn</strong> but set in each 
child. Works only if set before the child is added to the tabs. It is not updated 
if TABIMAGEn is changed.</p>

<h3><a name="Callbacks">Callbacks</a></h3>


<p>Inherits all callbacks of the <a href="../elem/iupcanvas.html">IupCanvas</a>, 
but redefines a few of them. Including BUTTON_CB, MOTION_CB, GETFOCUS_CB, 
KILLFOCUS_CB and LEAVEWINDOW_CB. 
To allow the application to use those callbacks the same callbacks are exported 
with the &quot;FLAT_&quot; prefix using the same parameters. They are all called before the internal callbacks and if they return 
IUP_IGNORE the internal callbacks are not processed. In FLATBUTTON_CB and 
FLAT_MOTION_CB use <a href="../func/iupconvertxytopos.html">IupConvertXYToPos</a> to convert 
	(x,y) coordinates in tab position (same as VALUEPOS) (since 3.23). </p>

<p><strong>TABCHANGE_CB</strong>: Callback called when the user changes the 
current tab.</p>
<div align="left">
  <pre>int function(Ihandle* <strong>ih</strong>, Ihandle* <strong>new_tab</strong>, Ihandle* <strong>old_tab</strong>); [in C]
<strong>ih</strong>:tabchange_cb(<strong>new_tab, old_tab</strong>: ihandle) -&gt; (<strong>ret</strong>: number) [in Lua]</pre>
</div>
<p class="info"><strong>ih</strong>: identifier of the element that activated 
the event.<br>
    <strong>new_tab</strong>: the new tab selected by the user 
  <br>
<strong>old_tab</strong>: the previously selected tab </p>
<p class="info"><u>Returns</u>: if IUP_IGNORE is returned the current tab is NOT 
changed.</p>
<p><strong>TABCHANGEPOS_CB</strong>: Callback called when the user changes the 
current tab. Called only when TABCHANGE_CB is not defined.</p>
<div align="left">
  <pre>int function(Ihandle* <strong>ih</strong>, int <strong>new_pos</strong>, int <strong>old_pos</strong>); [in C]
<strong>ih</strong>:tabchange_cb(<strong>new_pos, old_pos</strong>: number) -&gt; (<strong>ret</strong>: number) [in Lua]</pre>
</div>
<p class="info"><strong>ih</strong>: identifier of the element that activated 
the event.<br>
    <strong>new_pos</strong>: the new tab position selected by the user 
  <br>
<strong>old_pos</strong>: the previously selected tab position</p>
<p class="info"><u>Returns</u>: if IUP_IGNORE is returned the current tab is NOT 
changed.</p>
<p><strong>TABCLOSE_CB</strong>: Callback called when the user clicks on the 
close button. Called only when SHOWCLOSE=Yes.</p>
<div align="left">
  <pre>int function(Ihandle* <strong>ih</strong>, int <strong>pos</strong>); [in C]
<strong>ih</strong>:tabclose_cb(<strong>pos</strong>: number) -&gt; (<strong>ret</strong>: number) [in Lua]</pre>
</div>
<p class="info"><strong>ih</strong>: identifier of the element that activated 
the event.<br>
    <strong>pos</strong>: the tab position</p>
<p class="info"><u>Returns</u>: the tab will be hidden if the callback returns 
IUP_DEFAULT or if it does not exists. If IUP_CONTINUE is returned the tab is 
removed and its children are destroyed. If IUP_IGNORE is returned does nothing.</p>
<p><strong>RIGHTCLICK_CB</strong>: Callback called when the user clicks on some 
tab using the right mouse button.</p>
<div align="left">
  <pre>int function(Ihandle* <strong>ih</strong>, int <strong>pos</strong>); [in C]
<strong>ih</strong>:rightclick_cb(<strong>pos</strong>: number) -&gt; (<strong>ret</strong>: number) [in Lua]</pre>
</div>
<p class="info"><strong>ih</strong>: identifier of the element that activated 
the event.<br>
    <strong>pos</strong>: the tab position</p>
  <p><strong>EXTRABUTTON_CB</strong>:
  Action generated when any mouse button is 
  pressed or released. (since 3.22)</p>
<pre>int function(Ihandle* <strong>ih</strong>, int <strong>button</strong>, int <strong>pressed</strong>); [in C]
<strong>ih</strong>:extrabutton_cb(<strong>button</strong>, <strong>pressed</strong>: number) -&gt; (<strong>ret</strong>: number) [in Lua]</pre>
<p class="info"><strong>ih</strong>:
  identifies the element that activated the 
  event.<br><strong>button</strong>: identifies the extra button. Can be 1, 2, 3, 
4, and so on. (this is 
not the same as BUTTON_CB)<br><strong>pressed</strong>:
  indicates the state of the button (1=pressed, 0=released)</p>
<hr>

<p><a href="../call/iup_map_cb.html">MAP_CB</a>, 
<a href="../call/iup_unmap_cb.html">UNMAP_CB</a>, 
<a href="../call/iup_destroy_cb.html">DESTROY_CB</a>, 
<a href="../call/iup_enterwindow_cb.html">ENTERWINDOW_CB</a>,
  <a href="../call/iup_k_any.html">K_ANY</a>,
  <a href="../call/iup_help_cb.html">HELP_CB</a>: All common callbacks are 
supported.</p>
  

<h3><a name="Notes">Notes</a></h3>

<p>The Tabs can be created with no children and be dynamic filled using
  <a href="../func/iupappend.html">IupAppend</a>.</p>

<p>Its children automatically receives a name when the child is appended or 
inserted into the tabs. 
</p>
<p><span class="auto-style1"><strong>IMPORTANT</strong></span>: Similar to <strong>IupZbox</strong>, <strong>IupFlatTabs</strong> does depends on the VISIBLE attribute. 
To proper functioning we strongly recommend using a
<a href="iupbackgroundbox.html">IupBackgroundBox</a> for each child.</p>
<p>When you change the current tab the focus is usually not changed. If you want 
to control the focus behavior call 
<strong>IupSetFocus</strong> 
  in the TABCHANGE_CB callback. </p>
<p>When flattabs has the focus, the current tab can be changed using the left 
and right arrow keys. (since 3.25)</p>
<p>Differences from <a href="iuptabs.html">IupTabs</a>:</p>
<ul>
	<li>Appearance can be controlled for global features and for individual 
	tabs. </li>
	<li>Child focus can be controlled without native problems.</li>
	<li>Tabs can be individually disabled using TABACTIVEid attribute.</li>
	<li>Tab change can be controlled by the callbacks and ignored.</li>
	<li>TABTYPE is NOT supported. Only TOP tabs are implemented.</li>
	<li>MULTILINE is NOT supported. </li>
	<li>Mnemonics are NOT supported.</li>
</ul>
<h3>Utility Functions </h3>
<p>These functions can be used to set and get attributes from the element:</p>
<pre>void  IupSetAttributeId(Ihandle *ih, const char* name, int id, const char* value);
char* IupGetAttribute<span class="style3">Id</span>(Ihandle *ih, const char* name, int id);
int   IupGetInt<span class="style3">Id</span>(Ihandle *ih, const char* name, int id);
float IupGetFloat<span class="style3">Id</span>(Ihandle *ih, const char* name, int id);
void  IupSetfAttribute<span class="style3">Id</span>(Ihandle *ih, const char* name, int id, const char* format, ...);
void  IupSetIntId(Ihandle* ih, const char* name, int id, int value);
void  IupSetFloatId(Ihandle* ih, const char* name, int id, float value);</pre>
<p>They work just like the respective traditional set and get functions. But the attribute string is complemented with 
  the id value. For ex:</p>
<pre>IupSetAttributeId(ih, &quot;TABTITLE&quot;, 3, value) == IupSetAttribute(ih, &quot;TABTITLE3&quot;, value)</pre>
<p>But these functions are faster than the traditional functions because they do 
not need to parse the attribute name string and the application does not need to 
concatenate the attribute name with the id.</p>
<h3><a name="Examples">Examples</a></h3>
<p><a href="../../examples/">Browse for Example Files</a></p>
<pre> IupSetAttribute(ih, &quot;TABVISIBLE2&quot;, &quot;NO&quot;);
IupSetAttribute(ih, &quot;TABACTIVE3&quot;, &quot;NO&quot;);
IupSetAttribute(ih, &quot;SHOWCLOSE&quot;, &quot;Yes&quot;);
IupSetAttribute(ih, &quot;TABFONTSTYLE4&quot;, &quot;Bold&quot;);</pre>
<p class="auto-style2">
<img src="images/iupflattabs1.png"></p>
<pre> IupSetAttribute(ih, &quot;FORECOLOR&quot;, &quot;192 0 0&quot;);
IupSetAttribute(ih, &quot;TABSBACKCOLOR&quot;, &quot;192 0 0&quot;);
IupSetAttribute(ih, &quot;HIGHCOLOR&quot;, &quot;255 128 128&quot;);
IupSetAttribute(ih, &quot;CLOSEHIGHCOLOR&quot;, &quot;255 128 128&quot;);
IupSetAttribute(ih, &quot;TABSFORECOLOR&quot;, &quot;255 255 255&quot;);
IupSetAttribute(ih, &quot;SHOWLINES&quot;, &quot;NO&quot;);
IupSetAttribute(ih, &quot;SHOWCLOSE&quot;, &quot;NO&quot;);
IupSetAttribute(ih, &quot;EXPANDBUTTON&quot;, &quot;Yes&quot;);</pre>
<p class="auto-style2">
<img src="images/iupflattabs2.png"></p>

</body>

</html>